/*
 * $Id$
 */
package py.firefly.resolution;

import py.firefly.request.Response;
import py.firefly.util.JsonObject;

/**
 *
 * @author myang
 */
public class JSON extends Streaming {
   
    private Object _val;

    public JSON(final Object val) {
        super("application/json; charset=utf-8");
        _val = val;
    }

    @Override
    protected void stream(final Response resp) {
        resp.streamOut(JsonObject.toString(_val));
    }
}
